module.exports = {
    /**
     * 更新订单的配置
     * @url update/OrderConfig 前端调用的url参数地址
     */
    main: async (event) => {
          let { data = {}, userInfo, util, originalParam } = event;
          let { uniID, pubFun, vk , db, _ } = util;
          let res = { code : 0, msg : 'ok' };
          let dbName = 'vk-collection'
          // 业务逻辑开始----------------------------------------------------------- 
          if(!data.house_id) {
              return {
                  code: 412,
                  msg: '房屋id不能为空'
              }
          }
					let info = await db.collection(dbName).where({
					  house_id: data.house_id,
					  uid: data.uid
					}).get();
					if (!info) {
					  return {
					      code: 412,
					      msg: '暂无收藏数据，请稍后重试'
					  }
					}
          res.info = info
          res.data = await vk.baseDao.del({
            dbName,
            whereJson: {
              _id: info.data[0]._id
            }
          }, event.util);
          return res
    }
  
  }